<!DOCTYPE html>
<html>
<head>
  <title>Bubble Theme - Quill</title>
  <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="language" content="english">
<meta name="viewport" content="width=device-width">

<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
    
<meta name="description" content="Quill is a free, open source WYSIWYG editor built for the modern web. With its modular architecture and expressive API, it is completely customizable to fit any need.">

<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@quilljs">

<meta name="twitter:title" content="Bubble Theme - Quill">

<meta name="twitter:description" content="Quill is a free, open source WYSIWYG editor built for the modern web.">
<meta name="twitter:image" content="http://quilljs.com/assets/images/brand-asset.png">
<meta property="og:type" content="website">
<meta property="og:url" content="http://quilljs.com/standalone/bubble/">
<meta property="og:image" content="http://quilljs.com/assets/images/brand-asset.png">
<meta property="og:title" content="Bubble Theme - Quill">
<meta property="og:site_name" content="Quill">
 
<link type="application/atom+xml" rel="alternate" href="https://quilljs.com/feed.xml" title="Quill - Your powerful, rich text editor" />
  
  
<link rel="stylesheet" href="quill.bubble.css" />

<style>
  .standalone-container {
    margin: 0px auto;
    max-width: 100%;
  }
  #bubble-container {
    height: 100%;
  }
</style>


</head>
<body>
  
<div class="standalone-container">
  <div id="bubble-container"></div>
</div>
<script>
    //编辑内容
    function Msgtest(dict)
    {
        var contenStr = quill.container.firstChild.innerHTML;
        return contenStr;
    }
    //oc发布调用js
    function creatArticle(message){
        //quill.focus();
        //document.getElementById("bubble-container").focus();
        method.articleContent(Msgtest('1'));
    }
    //插入图片
    function insertImages(url,index){
        quill.insertEmbed(index, "image",url, "user");
    }
    //oc光标位置调用js
    function quillEditLocation(message){
        var contenStr = 0 + quill.getSelection().index;
        method.againEditindex(contenStr);
    }

    //oc开始编辑调用js
    function againEdit(locindex){
        bubble.focus();
    }

    function insertImage(url){
        quill.insertEmbed(quill.getSelection().index, "image",url, "user");
        return url
    }
    function getContent(){
        return quill.container.firstChild.innerHTML
    }

    function insertContent(content){
        quill.clipboard.dangerouslyPasteHTML(0, content);
    }
</script>
  
  
<script type="text/javascript" src="quill.min.js"></script>

<script type="text/javascript">
  var quill = new Quill('#bubble-container', {
    placeholder: '请输入内容',
    theme: 'bubble'
  });
</script>

</body>
</html>
